1600 |
How do I set a computated cell individually
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Number"); axG2antt1.Columns.Add("Format"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("1.23"); var_Items.set_CellValueFormat(h,1,EXG2ANTTLib.ValueFormatEnum.exComputedField); var_Items.set_CellValue(h,1,"2 * %0 + ` (2 * Number)`"); h = var_Items.AddItem("1.23"); var_Items.set_CellValueFormat(h,1,EXG2ANTTLib.ValueFormatEnum.exComputedField); var_Items.set_CellValue(h,1,"3 * %0 + ` (3 * Number)`"); h = var_Items.AddItem("1.23"); var_Items.set_CellValueFormat(h,1,EXG2ANTTLib.ValueFormatEnum.exComputedField); var_Items.set_CellValue(h,1,"currency(%0) + ` ( Currency(Number) )`"); axG2antt1.EndUpdate(); |
1599 |
How can I hide a specific hour
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.Columns.Add("Default"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.AllowInsideZoom = true; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.FirstVisibleDate = Convert.ToDateTime("3/31/2013",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,52); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.get_Level(1).Label = "<font ;6><%h%></font>"; var_Chart.UnitWidth = 14; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.AllowInsideZoom = true; var_Chart.DefaultInsideZoomFormat.InsideUnit = EXG2ANTTLib.UnitEnum.exMinute; var_Chart.AllowResizeInsideZoom = false; var_Chart.InsideZoomOnDblClick = false; EXG2ANTTLib.InsideZooms var_InsideZooms = var_Chart.InsideZooms; var_InsideZooms.SplitBaseLevel = false; var_InsideZooms.DefaultWidth = 0; EXG2ANTTLib.InsideZooms var_InsideZooms1 = var_Chart.InsideZooms; var_InsideZooms1.Add(Convert.ToDateTime("3/31/2013 23:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Item"); axG2antt1.EndUpdate(); |
1598 |
Is it possible to define the keys of the drop down values to be strings rather than numeric values
// Change event - Occurs when the user changes the cell's content. private void axG2antt1_Change(object sender, AxEXG2ANTTLib._IG2anttEvents_ChangeEvent e) { System.Diagnostics.Debug.Print( "NewValue is" ); System.Diagnostics.Debug.Print( e.newValue.ToString() ); } //this.axG2antt1.Change += new AxEXG2ANTTLib._IG2anttEvents_ChangeEventHandler(this.axG2antt1_Change); EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("DropDownList-String") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType; var_Editor.AddItem(1,"NYC|New York City",null); var_Editor.AddItem(2,"CJN|Cluj Napoca",null); EXG2ANTTLib.Editor var_Editor1 = (axG2antt1.Columns.Add("DropDownList-Numeric") as EXG2ANTTLib.Column).Editor; var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType; var_Editor1.AddItem(1,"New York City",null); var_Editor1.AddItem(2,"Cluj Napoca",null); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("NYC"),1,2); |
1597 |
I have an edit field, when going to edit mode, the rightmost part is shown. Is it possible to show the left part instead
axG2antt1.BeginUpdate(); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Edit") as EXG2ANTTLib.Column); var_Column.Width = 64; var_Column.AllowSizing = false; EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.MaskType; var_Editor.Mask = ";;;rich"; axG2antt1.Columns.Add("Empty"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("This is a bit ot long text"); var_Items.AddItem(""); axG2antt1.EndUpdate(); |
1596 |
I have a drop down field, the control shows the rightmost part of the selected caption. Is it possible to show the left part
axG2antt1.BeginUpdate(); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("DropDown") as EXG2ANTTLib.Column); var_Column.Width = 64; var_Column.AllowSizing = false; EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.DropDownAlignment = (EXG2ANTTLib.AlignmentEnum)0x20; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DropDownType; var_Editor.AddItem(1,"First item. This is a bit ot long text",null); var_Editor.AddItem(2,"Second item. This is a bit ot long text",null); var_Editor.AddItem(3,"Third item. This is a bit ot long text",null); var_Editor.Mask = ";;;rich"; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("PickEdit") as EXG2ANTTLib.Column); var_Column1.Width = 64; var_Column1.AllowSizing = false; EXG2ANTTLib.Editor var_Editor1 = var_Column1.Editor; var_Editor1.DropDownAlignment = (EXG2ANTTLib.AlignmentEnum)0x20; var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.PickEditType; var_Editor1.AddItem(1,"First item. This is a bit ot long text",null); var_Editor1.AddItem(2,"Second item. This is a bit ot long text",null); var_Editor1.AddItem(3,"Third item. This is a bit ot long text",null); var_Editor1.Mask = ";;;rich"; axG2antt1.Columns.Add("Empty"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("First item. This is a bit ot long text"),1,"Second item. This is a bit ot long text"); int h = var_Items.AddItem("First item. This is a bit ot long text"); EXG2ANTTLib.Editor var_Editor2 = var_Items.get_CellEditor(h,0); var_Editor2.DropDownAlignment = (EXG2ANTTLib.AlignmentEnum)0x20; var_Editor2.EditType = EXG2ANTTLib.EditTypeEnum.DropDownType; var_Editor2.AddItem(1,"First item. This is a bit ot long text",null); var_Editor2.AddItem(2,"Second item. This is a bit ot long text",null); var_Editor2.AddItem(3,"Third item. This is a bit ot long text",null); var_Items.set_CellValue(h,1,"Second item. This is a bit ot long text"); EXG2ANTTLib.Editor var_Editor3 = var_Items.get_CellEditor(h,1); var_Editor3.DropDownAlignment = (EXG2ANTTLib.AlignmentEnum)0x20; var_Editor3.EditType = EXG2ANTTLib.EditTypeEnum.PickEditType; var_Editor3.AddItem(1,"First item. This is a bit ot long text",null); var_Editor3.AddItem(2,"Second item. This is a bit ot long text",null); var_Editor3.AddItem(3,"Third item. This is a bit ot long text",null); axG2antt1.EndUpdate(); |
1595 |
Is there a property for the back color of the dropdown field
axG2antt1.BeginUpdate(); EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Date") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor.set_Option(EXG2ANTTLib.EditorOptionEnum.exDropDownBackColor,15790320); var_Editor.set_Option(EXG2ANTTLib.EditorOptionEnum.exDropDownForeColor,65793); axG2antt1.Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.EndUpdate(); |
1594 |
Is it possible to change a back color of the field/cell when it takes a focus
// EditClose event - Occurs when the edit operation ends. private void axG2antt1_EditCloseEvent(object sender, EventArgs e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.ClearCellBackColor(var_Items.FocusItem,axG2antt1.FocusColumnIndex); } //this.axG2antt1.EditCloseEvent += new EventHandler(this.axG2antt1_EditCloseEvent); // EditOpen event - Occurs when the edit operation starts. private void axG2antt1_EditOpen(object sender, EventArgs e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellBackColor(var_Items.FocusItem,axG2antt1.FocusColumnIndex,(uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0))); EXG2ANTTLib.Items var_Items1 = axG2antt1.Items; var_Items1.set_CellValue(var_Items1.FocusItem,axG2antt1.FocusColumnIndex,axG2antt1.Items.get_CellValue(axG2antt1.Items.FocusItem,axG2antt1.FocusColumnIndex)); } //this.axG2antt1.EditOpen += new EventHandler(this.axG2antt1_EditOpen); axG2antt1.FullRowSelect = EXG2ANTTLib.CellSelectEnum.exColumnSel; (axG2antt1.Columns.Add("C1") as EXG2ANTTLib.Column).Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; (axG2antt1.Columns.Add("C2") as EXG2ANTTLib.Column).Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("v1"),1,"v2"); var_Items.set_CellValue(var_Items.AddItem("v3"),1,"v4"); |
1593 |
How can I display the current date mask, but still allow empty values
axG2antt1.BeginUpdate(); axG2antt1.CauseValidateValue = EXG2ANTTLib.ValidateValueType.exValidateCell; axG2antt1.FullRowSelect = EXG2ANTTLib.CellSelectEnum.exColumnSel; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Date") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor.Mask = "!99/99/9999;1;;empty=1,validateas=1,invalid=Invalid date\\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character" + "!,select=4,overtype"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(null); var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(null); axG2antt1.EndUpdate(); |
1592 |
How can I align the days in a DateType editor
axG2antt1.Columns.Add("DropDown"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; EXG2ANTTLib.Editor var_Editor = var_Items.get_CellEditor(var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0); var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor.DropDownAlignment = EXG2ANTTLib.AlignmentEnum.RightAlignment; EXG2ANTTLib.Editor var_Editor1 = var_Items.get_CellEditor(var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0); var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor1.DropDownAlignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment; EXG2ANTTLib.Editor var_Editor2 = var_Items.get_CellEditor(var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0); var_Editor2.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor2.DropDownAlignment = EXG2ANTTLib.AlignmentEnum.LeftAlignment; EXG2ANTTLib.Editor var_Editor3 = var_Items.get_CellEditor(var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0); var_Editor3.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor3.DropDownAlignment = (EXG2ANTTLib.AlignmentEnum)0x20; EXG2ANTTLib.Editor var_Editor4 = var_Items.get_CellEditor(var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0); var_Editor4.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor4.DropDownAlignment = (EXG2ANTTLib.AlignmentEnum)0x20 | EXG2ANTTLib.AlignmentEnum.CenterAlignment; EXG2ANTTLib.Editor var_Editor5 = var_Items.get_CellEditor(var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0); var_Editor5.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor5.DropDownAlignment = (EXG2ANTTLib.AlignmentEnum)0x20 | EXG2ANTTLib.AlignmentEnum.RightAlignment; |
1591 |
How can I align the drop down portion rather the inside captions
(axG2antt1.Columns.Add("DropDown") as EXG2ANTTLib.Column).Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; EXG2ANTTLib.Items var_Items = axG2antt1.Items; EXG2ANTTLib.Editor var_Editor = var_Items.get_CellEditor(var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0); var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor.DropDownAlignment = (EXG2ANTTLib.AlignmentEnum)0x20; EXG2ANTTLib.Editor var_Editor1 = var_Items.get_CellEditor(var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))),0); var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor1.DropDownAlignment = EXG2ANTTLib.AlignmentEnum.exHOutside; var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); |
1590 |
Is it possible to show a message that the field is empty
axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.FullRowSelect = EXG2ANTTLib.CellSelectEnum.exColumnSel; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Float") as EXG2ANTTLib.Column); EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.MaskType; var_Editor.Mask = ";;;float,digits=0,grouping=,invalid=empty,warning=invalid character"; axG2antt1.Items.AddItem(192278); axG2antt1.Items.AddItem(1000); |
1589 |
How can I mask a date
axG2antt1.BeginUpdate(); axG2antt1.CauseValidateValue = EXG2ANTTLib.ValidateValueType.exValidateCell; axG2antt1.FullRowSelect = EXG2ANTTLib.CellSelectEnum.exColumnSel; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.Columns.Add("Date"); axG2antt1.Columns.Add("Mask"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); EXG2ANTTLib.Editor var_Editor = var_Items.get_CellEditor(h,0); var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor.Mask = "{1,12}/{1,31}/{1950,2050};1;;select=1,warning=Invalid character!,invalid=Invalid date\\, for the input mask <br><b>'<%mask%>'</" + "b>!,validateas=1"; var_Items.set_CellValue(h,1,var_Items.get_CellEditor(h,0).Mask); h = var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); EXG2ANTTLib.Editor var_Editor1 = var_Items.get_CellEditor(h,0); var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor1.Mask = "!99/99/9999;1;;empty,validateas=1,invalid=Invalid date\\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!," + "select=4,overtype"; var_Items.set_CellValue(h,1,var_Items.get_CellEditor(h,0).Mask); h = var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); EXG2ANTTLib.Editor var_Editor2 = var_Items.get_CellEditor(h,0); var_Editor2.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor2.Mask = "!99/99/9999;;;empty,validateas=1,invalid=Invalid date\\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,s" + "elect=4,overtype"; var_Items.set_CellValue(h,1,var_Items.get_CellEditor(h,0).Mask); h = var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); EXG2ANTTLib.Editor var_Editor3 = var_Items.get_CellEditor(h,0); var_Editor3.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor3.Mask = "!99/99/9999;; ;select=4,overtype,empty,warning=Invalid character!,invalid=Invalid date\\, for the input mask <br><b>'<%mask%>'<" + "/b>!,validateas=1"; var_Items.set_CellValue(h,1,var_Items.get_CellEditor(h,0).Mask); h = var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); EXG2ANTTLib.Editor var_Editor4 = var_Items.get_CellEditor(h,0); var_Editor4.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor4.Mask = "![0-9 ][0-9 ]/[0-9 ][0-9 ]/[0-9 ][0-9 ][0-9 ][0-9 ];1;;empty,validateas=1,invalid=Invalid date\\, for the input mask <br><b>'<%" + "mask%>'</b>!,warning=Invalid character!,select=4,leading= "; var_Items.set_CellValue(h,1,var_Items.get_CellEditor(h,0).Mask); h = var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_FormatCell(h,0,"len(value) ? shortdateF(value) : ``"); EXG2ANTTLib.Editor var_Editor5 = var_Items.get_CellEditor(h,0); var_Editor5.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor5.Mask = "!99/99/9999;1;;empty,validateas=1,invalid=Invalid date\\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!," + "select=4,overtype,leading"; var_Items.set_CellValue(h,1,var_Items.get_CellEditor(h,0).Mask); h = var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_FormatCell(h,0,"len(value) ? shortdateF(value) : ``"); EXG2ANTTLib.Editor var_Editor6 = var_Items.get_CellEditor(h,0); var_Editor6.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor6.Mask = "!00/00/0000;1;;empty,validateas=1,invalid=Invalid date\\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!," + "select=4,overtype,leading"; var_Items.set_CellValue(h,1,var_Items.get_CellEditor(h,0).Mask); h = var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_FormatCell(h,0,"len(value) ? shortdateF(value) : ``"); EXG2ANTTLib.Editor var_Editor7 = var_Items.get_CellEditor(h,0); var_Editor7.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor7.Mask = "!00/00/0000;;0;empty,validateas=1,invalid=Invalid date\\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!," + "select=4,overtype"; var_Items.set_CellValue(h,1,var_Items.get_CellEditor(h,0).Mask); h = var_Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_FormatCell(h,0,"len(value) ? shortdateF(value) : ``"); EXG2ANTTLib.Editor var_Editor8 = var_Items.get_CellEditor(h,0); var_Editor8.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor8.Mask = "!00/00/0000;;;empty,validateas=1,invalid=Invalid date\\, for the input mask <br><b>'<%mask%>'</b>!,warning=Invalid character!,s" + "elect=1,overtype"; var_Items.set_CellValue(h,1,var_Items.get_CellEditor(h,0).Mask); axG2antt1.EndUpdate(); |
1588 |
How can I display and edit an integer number to show grouping digits too ( no decimals)
EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Float") as EXG2ANTTLib.Column); var_Column.FormatColumn = "value format `0`"; EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.MaskType; var_Editor.Mask = ";;;float,digits=0"; axG2antt1.Items.AddItem(192278); |
1587 |
How can I display and edit a float number to show grouping digits too
EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Float") as EXG2ANTTLib.Column); var_Column.FormatColumn = "value format ``"; EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.MaskType; var_Editor.Mask = ";;;float"; axG2antt1.Items.AddItem(192278); |
1586 |
How can I mask a phone number
axG2antt1.CauseValidateValue = EXG2ANTTLib.ValidateValueType.exValidateCell; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.FullRowSelect = EXG2ANTTLib.CellSelectEnum.exColumnSel; (axG2antt1.Columns.Add("Phone") as EXG2ANTTLib.Column).Editor.EditType = EXG2ANTTLib.EditTypeEnum.MaskType; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(null); EXG2ANTTLib.Editor var_Editor = var_Items.get_CellEditor(h,0); var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.MaskType; var_Editor.Mask = "!(999) 000 0000;1;;select=1,empty,overtype,warning=invalid characer,invalid=The value you entered isn't appropriate for the inp" + "ut mask <b>'<%mask%>'</b> specified for this field."; h = var_Items.AddItem("0123"); EXG2ANTTLib.Editor var_Editor1 = var_Items.get_CellEditor(h,0); var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.MaskType; var_Editor1.Mask = "!(999) 000 0000;2;;select=4"; h = var_Items.AddItem("0123"); EXG2ANTTLib.Editor var_Editor2 = var_Items.get_CellEditor(h,0); var_Editor2.EditType = EXG2ANTTLib.EditTypeEnum.MaskType; var_Editor2.Mask = "`Phone: `!(999) 000-0000"; h = var_Items.AddItem("(074) 876-1222"); EXG2ANTTLib.Editor var_Editor3 = var_Items.get_CellEditor(h,0); var_Editor3.EditType = EXG2ANTTLib.EditTypeEnum.MaskType; var_Editor3.Mask = "!(999) 000-0000;0"; |
1585 |
Is it possible to display the ColorType fields using RGB format
(axG2antt1.Columns.Add("Color") as EXG2ANTTLib.Column).Editor.EditType = EXG2ANTTLib.EditTypeEnum.ColorType; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(255); int h = var_Items.AddItem(255); EXG2ANTTLib.Editor var_Editor = var_Items.get_CellEditor(h,0); var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.ColorType; var_Editor.Mask = "`RGB(`{0,255}\\,{0,255}\\,{0,255}`)`;;0"; h = var_Items.AddItem(255); EXG2ANTTLib.Editor var_Editor1 = var_Items.get_CellEditor(h,0); var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.ColorType; var_Editor1.Mask = "`&H`XXXXXXXX`&`;;0;overtype,insertype,warning=Wrong!"; h = var_Items.AddItem(255); EXG2ANTTLib.Editor var_Editor2 = var_Items.get_CellEditor(h,0); var_Editor2.EditType = EXG2ANTTLib.EditTypeEnum.ColorType; var_Editor2.Mask = "`0x`XX `0x`XX `0x`XX;;0;overtype,insertype,warning=Wrong!"; h = var_Items.AddItem(255); EXG2ANTTLib.Editor var_Editor3 = var_Items.get_CellEditor(h,0); var_Editor3.EditType = EXG2ANTTLib.EditTypeEnum.ColorType; var_Editor3.Mask = "R{0,255} G{0,255} B{0,255};;0;overtype,insertype,warning=Wrong!"; h = var_Items.AddItem(255); EXG2ANTTLib.Editor var_Editor4 = var_Items.get_CellEditor(h,0); var_Editor4.EditType = EXG2ANTTLib.EditTypeEnum.ColorType; var_Editor4.Mask = "`(hexa) RGB 0x`XXXXXX;;0;overtype,insertype,warning=Wrong!"; h = var_Items.AddItem(255); EXG2ANTTLib.Editor var_Editor5 = var_Items.get_CellEditor(h,0); var_Editor5.EditType = EXG2ANTTLib.EditTypeEnum.ColorType; var_Editor5.Mask = "`(decimal) Red: `{0,255}` Green: `{0,255}` Blue: `{0,255};;0;overtype,insertype,warning=Wrong!"; h = var_Items.AddItem(255); EXG2ANTTLib.Editor var_Editor6 = var_Items.get_CellEditor(h,0); var_Editor6.EditType = EXG2ANTTLib.EditTypeEnum.ColorType; var_Editor6.Mask = "`(combine) Red: `{0,255}` Green: 0x`XX` Blue: `{0,255};;0;overtype,insertype,warning=Wrong!"; |
1584 |
How can I specify a different color for bars that cross over the non-working part of the chart
axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Bars var_Bars = axG2antt1.Chart.Bars; var_Bars.Copy("Task","STask").Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Bars.Add("Task:STask").Shortcut = "TS"; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,96); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.NonworkingDaysColor = var_Chart.Bars["STask"].Color; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"TS",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); |
1583 |
How can I merge two columns
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { axG2antt1.Items.set_CellMerge(e.item,0,1); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); axG2antt1.MarkSearchColumn = false; axG2antt1.TreeColumnIndex = -1; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; (axG2antt1.Columns.Add("C1") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellSingleLine,false); axG2antt1.Columns.Add("C2"); axG2antt1.Columns.Add("C3"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."); var_Items.AddItem("This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."); |
1582 |
How can I expand an item once the user clicks the column's checkbox
|
1581 |
How can I define a column with check-box
axG2antt1.BeginUpdate(); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.AllowSizing = false; var_Column.Width = 18; var_Column.PartialCheck = true; var_Columns.Add("Tasks"); axG2antt1.ShowFocusRect = false; axG2antt1.HasButtons = EXG2ANTTLib.ExpandButtonEnum.exNoButtons; axG2antt1.TreeColumnIndex = 1; axG2antt1.Indent = 14; axG2antt1.ExpandOnDblClick = false; axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(""); var_Items.set_CellState(h,0,1); var_Items.set_CellValue(h,1,"Project"); int hChild = var_Items.InsertItem(h,null,""); var_Items.set_CellValue(hChild,1,"Task 1"); hChild = var_Items.InsertItem(h,null,""); var_Items.set_CellValue(hChild,1,"Task 2"); var_Items.set_ExpandItem(h,true); axG2antt1.EndUpdate(); |
1580 |
We need to know how it's possibile to have the bars on the same line and not in a different line
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Chart.set_PaneWidth(false,128); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Tasks"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C",null); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.AddLink("AB",h,"A",h,"B"); var_Items.AddLink("BC",h,"B",h,"C"); axG2antt1.EndUpdate(); |
1579 |
The Change event gets me the today date. How can I find what user typed
// Change event - Occurs when the user changes the cell's content. private void axG2antt1_Change(object sender, AxEXG2ANTTLib._IG2anttEvents_ChangeEvent e) { System.Diagnostics.Debug.Print( "NewValue:" ); System.Diagnostics.Debug.Print( e.newValue.ToString() ); System.Diagnostics.Debug.Print( "EditingValue:" ); System.Diagnostics.Debug.Print( axG2antt1.EditingText ); } //this.axG2antt1.Change += new AxEXG2ANTTLib._IG2anttEvents_ChangeEventHandler(this.axG2antt1_Change); axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); (axG2antt1.Columns.Add("Edit") as EXG2ANTTLib.Column).Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; axG2antt1.Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.EndUpdate(); |
1578 |
How can I add a footer row
axG2antt1.ShowLockedItems = true; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exVLines; axG2antt1.Columns.Add("C1"); axG2antt1.Columns.Add("C2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_LockedItemCount(EXG2ANTTLib.VAlignmentEnum.exBottom,1); int h = var_Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exBottom,0); var_Items.set_ItemBackColor(h,(uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128))); var_Items.set_ItemForeColor(h,(uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,255))); var_Items.set_CellValue(h,0,"footer c1"); var_Items.set_CellValue(h,1,"footer c2"); var_Items.set_CellValue(var_Items.AddItem("cell"),1,"cell"); |
1577 |
How can I add a header row
axG2antt1.ShowLockedItems = true; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exVLines; axG2antt1.Columns.Add("C1"); axG2antt1.Columns.Add("C2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_LockedItemCount(EXG2ANTTLib.VAlignmentEnum.exTop,1); int h = var_Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exTop,0); var_Items.set_ItemBackColor(h,(uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128))); var_Items.set_ItemForeColor(h,(uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,255))); var_Items.set_CellValue(h,0,"footer c1"); var_Items.set_CellValue(h,1,"footer c2"); var_Items.set_CellValue(var_Items.AddItem("cell"),1,"cell"); |
1576 |
How can I fix a column, while other sizable and fill the control's client
axG2antt1.ColumnAutoResize = true; axG2antt1.Columns.Add("Sizable"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("F") as EXG2ANTTLib.Column); var_Column.AllowSizing = false; var_Column.Width = 16; |
1575 |
How can I programmatically add more columns to the sort bar and other to be sorted, but not included in the sort bar
axG2antt1.SortBarVisible = true; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add(0.ToString()); var_Columns.Add(1.ToString()); var_Columns.Add(2.ToString()); var_Columns.Add(3.ToString()); var_Columns.Add(4.ToString()); axG2antt1.Layout = "multiplesort=\"C3:1 C4:2\";singlesort=\"C2:1\""; |
1574 |
I'm using different bar types, in order to use different colours. The problem I'm having is that when two bars of different types overlap, and should in the histogram show as overallocated, they instead overlap here too, and show as single unit. Is there a way I can correctly show this as an overallocation
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 32; var_Chart.Bars["Task"].HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal; var_Chart.set_PaneWidth(false,128); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h = var_Items.AddItem("Item 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.AddBar(var_Items.AddItem("Item 3"),"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); |
1573 |
Is it possible to assign a different EBN to a specified bar
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); var_Appearance.Add(2,"c:\\exontrol\\images\\pushed.ebn"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); h = var_Items.AddItem("Task 3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16777216); h = var_Items.AddItem("Task 4"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16777471); h = var_Items.AddItem("Task 5"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,33619967); axG2antt1.EndUpdate(); |
1572 |
How can I provide a mask for a date column
// Change event - Occurs when the user changes the cell's content. private void axG2antt1_Change(object sender, AxEXG2ANTTLib._IG2anttEvents_ChangeEvent e) { System.Diagnostics.Debug.Print( "Prev Value " ); System.Diagnostics.Debug.Print( axG2antt1.Items.get_CellValue(e.item,e.colIndex).ToString() ); System.Diagnostics.Debug.Print( "Check and Update the NewValue" ); System.Diagnostics.Debug.Print( e.newValue.ToString() ); e.newValue = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); } //this.axG2antt1.Change += new AxEXG2ANTTLib._IG2anttEvents_ChangeEventHandler(this.axG2antt1_Change); axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Date") as EXG2ANTTLib.Column); var_Column.FormatColumn = "day(value) + `/` + month(value) + `/` + year(value)"; EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; var_Editor.Mask = "{1,12}\\/{1,31}\\/{1,2099}"; axG2antt1.Items.AddItem(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.EndUpdate(); |
1571 |
I am trying to introduce a custom tool tip to those particular cells. I have it working and I know I can style the font etc. however, what I would like to do is style the tooltip container itself like add some padding or add a border color. Is this possible
|
1570 |
Is it possible to edit a float number without using of e/E/d/D (exponent) and +/- (signs) characters
EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Edit") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; var_Editor.Numeric = EXG2ANTTLib.NumericEnum.exDisableSigns | EXG2ANTTLib.NumericEnum.exFloatInteger; axG2antt1.Items.AddItem(1.22); |
1569 |
How can I edit a float number with no using of e/E/d/D and + character
EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Edit") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; var_Editor.Numeric = EXG2ANTTLib.NumericEnum.exDisablePlus | EXG2ANTTLib.NumericEnum.exFloatInteger; axG2antt1.Items.AddItem(1.22); |
1568 |
Is it possible to edit a float number with no using of e/E/d/D (exponent) characters
EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Edit") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; var_Editor.Numeric = EXG2ANTTLib.NumericEnum.exFloatInteger; axG2antt1.Items.AddItem(1.22); |
1567 |
How can I edit an integer with no using of +/- signs
EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Edit") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; var_Editor.Numeric = (EXG2ANTTLib.NumericEnum)0xfc | EXG2ANTTLib.NumericEnum.exDisableSigns | EXG2ANTTLib.NumericEnum.exFloatInteger | EXG2ANTTLib.NumericEnum.exFloat; axG2antt1.Items.AddItem(1); |
1566 |
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares
EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Value"); EXG2ANTTLib.Column var_Column = (var_Columns.Add("CellSingleLine = False") as EXG2ANTTLib.Column); var_Column.ComputedField = "%0"; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellSingleLine,false); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("FormatColumn/replace CRLF") as EXG2ANTTLib.Column); var_Column1.ComputedField = "%0"; var_Column1.FormatColumn = "value replace `\\r\\n` with ``"; EXG2ANTTLib.Column var_Column2 = (var_Columns.Add("FormatColumn/replace TAB,CRLF") as EXG2ANTTLib.Column); var_Column2.ComputedField = "%0"; var_Column2.FormatColumn = "(value replace `\\t` with ``) replace `\\r\\n` with ``"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("a\\ta\\r\\nb\\tb"); |
1565 |
I am using the Chart.ShowLinksColor property, the question is it is possible to prevent changing the bar's color
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.NonworkingDays = 0; var_Chart.LinksStyle = EXG2ANTTLib.LinkStyleEnum.exLinkSolid; var_Chart.set_ShowLinksColor(EXG2ANTTLib.ShowLinksEnum.exUpdateColorLinksOnly | EXG2ANTTLib.ShowLinksEnum.exShowLinksStartFrom,(uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0))); var_Chart.set_ShowLinksColor(EXG2ANTTLib.ShowLinksEnum.exUpdateColorLinksOnly | EXG2ANTTLib.ShowLinksEnum.exShowLinksEndTo,(uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0))); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h2,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); var_Items.AddLink("L1",h1,"",h2,""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L2",h2,"",h3,""); var_Items.SchedulePDM(0,""); axG2antt1.EndUpdate(); |
1564 |
Apparently, the links are shown on the back. Is there any option to bring them in front
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/19/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); var_Chart.NonworkingDaysPattern = EXG2ANTTLib.PatternEnum.exPatternSolid; var_Chart.ShowLinks = EXG2ANTTLib.ShowExtendedLinksEnum.exShowLinksFront | EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h2,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); var_Items.AddLink("L1",h1,"",h2,""); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L1"); axG2antt1.EndUpdate(); |
1563 |
How can I enable the extended links feature
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.NonworkingDays = 0; var_Chart.LinksStyle = EXG2ANTTLib.LinkStyleEnum.exLinkSolid; var_Chart.ShowLinks = EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L1",h1,"",h2,""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L2",h3,"",h2,""); var_Items.SchedulePDM(0,""); axG2antt1.EndUpdate(); |
1562 |
How do I count all bars in the chart
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Task"); var_Items.AddBar(hSummary,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.InsertItem(hTask,null,"Task A.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K11",null); var_Items.AddBar(var_Items.InsertItem(hTask,null,"Task A.2"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K12",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hTask,null,"Task B.1"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K21",null); var_Items.set_ExpandItem(0,true); System.Diagnostics.Debug.Print( "Count: " ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(0,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); axG2antt1.EndUpdate(); |
1561 |
Is there any property to count the all child bars of a specified item ( all descendents )
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars.Copy("Task","CountTask").Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Project"); var_Items.set_ItemBold(hSummary,true); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"CountTask",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.InsertItem(hTask,null,"Task A.1"),"CountTask",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K11",null); var_Items.AddBar(var_Items.InsertItem(hTask,null,"Task A.2"),"CountTask",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K12",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"CountTask",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hTask,null,"Task B.1"); var_Items.AddBar(hTask,"CountTask",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K21",null); var_Items.set_ExpandItem(0,true); var_Items.DefaultItem = var_Items[0]; System.Diagnostics.Debug.Print( "Count: " ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(-3,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); var_Items.DefaultItem = 0; axG2antt1.EndUpdate(); |
1560 |
Is there any property to count the child bars of a specified item ( leaf descendents )
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars.Copy("Task","CountTask").Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Project"); var_Items.set_ItemBold(hSummary,true); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.InsertItem(hTask,null,"Task A.1"),"CountTask",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K11",null); var_Items.AddBar(var_Items.InsertItem(hTask,null,"Task A.2"),"CountTask",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K12",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hTask,null,"Task B.1"); var_Items.AddBar(hTask,"CountTask",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K21",null); var_Items.set_ExpandItem(0,true); var_Items.DefaultItem = var_Items[0]; System.Diagnostics.Debug.Print( "Count: " ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(-2,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); var_Items.DefaultItem = 0; axG2antt1.EndUpdate(); |
1559 |
Is there any property to count the child bars of a specified item ( direct descendents )
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars.Copy("Task","CountTask").Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Project"); var_Items.set_ItemBold(hSummary,true); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"CountTask",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.InsertItem(hTask,null,"Task A.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K11",null); var_Items.AddBar(var_Items.InsertItem(hTask,null,"Task A.2"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K12",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"CountTask",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hTask,null,"Task B.1"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K21",null); var_Items.set_ExpandItem(0,true); var_Items.DefaultItem = var_Items[0]; System.Diagnostics.Debug.Print( "Count: " ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(-1,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarsCount).ToString() ); var_Items.DefaultItem = 0; axG2antt1.EndUpdate(); |
1558 |
How can I define all child items to belong to a summary bar (DefineSummaryBars-3)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hTask,null,"Task A.1"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K11",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hTask,null,"Task B.1"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K21",null); var_Items.DefineSummaryBars(hSummary,"",-3,"<K*>"); var_Items.set_ExpandItem(0,true); axG2antt1.EndUpdate(); |
1557 |
Can I define automatically the leaf descendents of the summary bar (DefineSummaryBars-2)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"1Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hTask,null,"Task A.1"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K11",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"1Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hTask,null,"Task B.1"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K21",null); var_Items.DefineSummaryBars(hSummary,"",-2,"<K*>"); var_Items.set_ExpandItem(0,true); axG2antt1.EndUpdate(); |
1556 |
How can I assign the childs bars to a summary bar (DefineSummaryBars-1)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ExpandItem(hSummary,true); var_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); axG2antt1.EndUpdate(); |
1555 |
Is it possible to define a summary bar to include all bars in the chart (DefineSummaryBars-0)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"summary",null); var_Items.AddBar(var_Items.AddItem("Task A"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task B"),"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddBar(var_Items.AddItem("Task C"),"Task",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.DefineSummaryBars(hSummary,"summary",0,"<K*>"); axG2antt1.EndUpdate(); |
1554 |
Is there any way to "unselect" radio group
// DblClick event - Occurs when the user dblclk the left mouse button over an object. private void axG2antt1_DblClick(object sender, AxEXG2ANTTLib._IG2anttEvents_DblClickEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.get_CellChecked(1234); var_Items.set_CellHasCheckBox(0,h,true); var_Items.set_CellState(0,h,0); var_Items.set_CellHasCheckBox(0,h,false); } //this.axG2antt1.DblClick += new AxEXG2ANTTLib._IG2anttEvents_DblClickEventHandler(this.axG2antt1_DblClick); // SelectionChanged event - Fired after a new item has been selected. private void axG2antt1_SelectionChanged(object sender, EventArgs e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellState(var_Items.FocusItem,0,1); } //this.axG2antt1.SelectionChanged += new EventHandler(this.axG2antt1_SelectionChanged); axG2antt1.MarkSearchColumn = false; axG2antt1.SelBackColor = Color.FromArgb(255,255,128); axG2antt1.SelForeColor = Color.FromArgb(0,0,0); axG2antt1.Columns.Add("Default"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Radio 1"); var_Items.set_CellHasRadioButton(h,0,true); var_Items.set_CellRadioGroup(h,0,1234); h = var_Items.AddItem("Radio 2"); var_Items.set_CellHasRadioButton(h,0,true); var_Items.set_CellRadioGroup(h,0,1234); var_Items.set_CellState(h,0,1); h = var_Items.AddItem("Radio 3"); var_Items.set_CellHasRadioButton(h,0,true); var_Items.set_CellRadioGroup(h,0,1234); |
1553 |
The Column.Alignment property does not seem to work for cells with images in them. What can be done
axG2antt1.BeginUpdate(); axG2antt1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); axG2antt1.TreeColumnIndex = -1; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.HeaderHeight = 24; axG2antt1.DefaultItemHeight = 24; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Image") as EXG2ANTTLib.Column); var_Column.AllowSizing = false; var_Column.Width = 32; var_Column.HTMLCaption = "<img>1</img>"; var_Column.HeaderAlignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Column.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); axG2antt1.Columns.Add("Rest"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("<img>1</img>"); var_Items.AddItem("<img>2</img>"); var_Items.AddItem("<img>3</img>"); axG2antt1.EndUpdate(); |
1552 |
Is there any way to determine in a bar would overlay another bar or to not allow this and get some error indication
// BarResize event - Occurs when a bar is moved or resized. private void axG2antt1_BarResize(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent e) { axG2antt1.Refresh(); } //this.axG2antt1.BarResize += new AxEXG2ANTTLib._IG2anttEvents_BarResizeEventHandler(this.axG2antt1_BarResize); axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.Columns.Add("InterectBars"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIntersect; var_Bar.set_Overlaid(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIntersect,"ERROR"); EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars.Add("ERROR"); var_Bar1.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_Bar1.Pattern = EXG2ANTTLib.PatternEnum.exPatternSolid; var_Bar1.Height = 7; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem(""); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.set_CellValue(h,0,var_Items.get_IntersectBars(h,"A",h,"B")); h = var_Items.AddItem(""); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.set_CellValue(h,0,var_Items.get_IntersectBars(h,"A",h,"B")); h = var_Items.AddItem(""); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items.set_CellValue(h,0,var_Items.get_IntersectBars(h,"A",h,"B")); axG2antt1.EndUpdate(); |
1551 |
Is it possible to change the font size of the header compared to that of the control. I would like to make the font of the headers smaller
axG2antt1.BeginUpdate(); axG2antt1.HeaderHeight = 32; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("ID") as EXG2ANTTLib.Column); var_Column.HTMLCaption = "<font ;16>ID"; var_Column.Width = 32; var_Column.AllowSizing = false; (var_Columns.Add("Task") as EXG2ANTTLib.Column).HTMLCaption = "<font ;16>Task"; axG2antt1.FocusColumnIndex = 1; axG2antt1.ShowFocusRect = false; axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(1),1,"Task A"); var_Items.set_CellValue(var_Items.AddItem(2),1,"Task B"); axG2antt1.EndUpdate(); |
1550 |
How can I create items and bars at runtime
axG2antt1.BeginUpdate(); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("ID") as EXG2ANTTLib.Column); var_Column.FormatColumn = "1 index ''"; var_Column.Width = 32; var_Column.AllowSizing = false; (var_Columns.Add("Task") as EXG2ANTTLib.Column).Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; axG2antt1.FocusColumnIndex = 1; axG2antt1.ShowFocusRect = false; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; axG2antt1.Template = "Chart.Bars(\"Task\"){Def(3) = \"<%=%C1%>\";Def(4)=18}"; axG2antt1.EndUpdate(); |
1549 |
How can I a group summary bar with a task bar, so when the summary bar changes the task bar will move accordingly
axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int hTask = var_Items.AddItem("Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.DefineSummaryBars(hSummary,"",hTask,""); hTask = var_Items.AddItem("Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.DefineSummaryBars(hSummary,"",hTask,""); |
1548 |
How can I show the bars using a solid color, with no pattern inside
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.NonworkingDays = 0; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars["Task"].Pattern = EXG2ANTTLib.PatternEnum.exPatternSolid; axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Solid A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C",null); var_Items.set_ItemBar(h,"C",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280); h = var_Items.AddItem("Solid B"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,255); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,65280); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C",null); var_Items.set_ItemBar(h,"C",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16711680); var_Items.set_ItemBar(h,"C",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,16711935); axG2antt1.EndUpdate(); |
1547 |
Basically what I am trying to do is replicate MS Project look & feel. Is that possible
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BNUMQAAYAQGKIYBkAKBQAGaAoDDMOQ4QwAAxDCKsEwsACEIrjKCRShyCYZRhGcTALD8EhhECTZKkAYQEiKLoaRzAcwyDAcQRFCKUJxhEYZa" + "i+NobSBQMZqBQgASIUCLZ5ACSYEigAovTULCKwJiWNZDUTRcTxCKQahLLivIhGUYKfgmY5lT5VUT1HS9IShJSmKTlORLOi+M4zUJLc4SVblGz7FyfYDBKygLqqFigLAx" + "dDYTRNfzjHiTKbtGA7MADA4DVTAeC2bC+EYVTytY4sHQrIACZ5iWREMhXTi0E4rTa6dTxaS6KzKGqsZbsNAbHLdHTfVy1Mx1XaobqDJZdaTpdjaTDeJSjVjKdx4TZqSi" + "zjSGJOgcU4RhcIQDDURhIESXwEGgbQJBQQjeggQBiC4NJAluGJrAUB5Lmmc56n4Pp/i+NQjmqdQ5k2J5+AGAAgCgFgEgAHxQAGfoBmAOA2AaAxghgLgOgMIJ4AoER8mE" + "WBSBoNohHKAgZgSYgIHYH4ImCB5OAqBghjiEgcgmIQoioD4IiKGJGCsUgUHiVirmOBQVAEgI="); var_Appearance.Add(39,"CP:1 -1 -1 0 0"); var_Appearance.Add(40,"gBFLBCJwBAEHhEJAEGg4BEcMQAAYAQGKIYBkAKBQAGaAoDDMOQ4QwAAxDCKsEwsACEIrjKCRShyCYZRhGcTAFD8EhhECTZKkAZwEiKLoaRzAcwyDAcQRFCKUJxlKa5P" + "jaLwAAbJMZKAqDDgBIijIqnKA5JoyKIkTzCIJxXScByDGqNaQoehYXhEMg1CTXVgRCKoYTDBKybLqGT6VoCP5vWJaURWHZFTTJOyNagmSJ6XACbQMW7gNYQGBEEigNIx" + "ToOU4jFDGIB2VAQRK5BDQbQSFCpIRCCRQYhcQJ6YIAD76HomS5NU7UNKhHSdMy3J6ra5sOqbBqWa5LWjbNq3DadSzvPKub5vexwHwWawSUDkOR5Li+M43S4JPS5bZdDx" + "PiWVJrnWOw9F6XxTiGWpsHcO5+C6Xx7kOZpwHoOxeF8T4fkeYJgnEdZwOwQRBnSex9H6f4vk+c5xn4fZQhQBCAg=="); var_Appearance.Add(41,"gBFLBCJwBAEHhEJAEGg4BQICg6AADACAxRDAMkOQAGaAoDDUMQyQwAAxDSK8EwsACEIrjKCRShyCYZRhGcTALBMIwKGABIRGUZJGDkOYgDCBEhTHDUOwHGyQYDkCQoR" + "iYMAwTBQMaTXDdCQ1ECkJomObqAgkMZCTbKMySAA0NgPD6sKSjOIRSDUJZcV5EoAKfiqZIRSJSMZVLLVNSVJipAAlOTZPo6JJuTLOE4WVRcSydH6oAApeg6KoYAFzQAE" + "DCbYgOTKBYLUOCwTZmDwTK6BcTtXDbejeYYcZ7DNj2NYtJ4TRCBcpzLLIXrCKg0TBPQ4YNC2DT5VDWIq1aDdQo7MpxWjlGI5Ri2c51UDSYi0G4tDyLSYWXDfFSQTrHDQ" + "XhAAghCUAxJgyaB1DkGRyDCKBhAiGwLg0DYhCKDI8CcVwIAwRotBeAYCCmBZ0nsfR+n+L5PlYE53BwTpzn4AIAiAGAOAMfZfmeVBwDuD54C4DYDCCaA6AgQJfHGPJtD+" + "YRoGIF4GGGrAAH2RpjjCf4IGIOIKCSCQhmeXBtDqT54i4LYLCKaI6CkfRGlOKgtg2IxYl4OoMkwIYwmkP5jmkAg/hAZAYnAaw6A+eQeEmEgkikKg8BqDkYFCFIlBkThT" + "g8BoThif4WGWORqFyFwjkGIJlD+ZgphIY4ZGYWYEmSGQmjGIhthvMpwGcOJPnmTh1h0JxploPAZg4I5+HyH4nlmfh/g8BhTgSf4hGgegagiIlShCYA/miahCg+JBpUIY" + "w3k+ehehmJgpioaoWDeKYagAY4oioSZFn2BQfFGCJdD+aoqjKK4rGqWJwGENwPnqTo1i1gtiBgDYzn6PIviuWp+j+DwFnMaJ/jEbB7BqSIyCOQR4lkP5smsQpPjQbQbD" + "SWI0C0cR6lmNpqGMCgJDCBZTFyf44G4O4KmSOWTnCVg/m6K4ymuOxu4OWw1E+e5OnWPQvGvYgWg0Q5+nyP4vlvE+OBMTJ/kEcB8BsCJCDATArA6QhxAgeIgkScRMFcFp" + "FlCFAEICA"); var_Appearance.Add(42,"gBFLBCJwBAEHhEJAEGg4BY8MQAAYAQGKIYBkAKBQAGaAoDDMOQ4QwAAwjQLMEwsACEIrjKCRShyCYZRhGcTALD8EhhECTZKkAYgEiKLoaRzAcwyDAcQRFCKUJxhEY5a" + "i+NobRCAUiwHQUBr/I4AKLfeJ5dACKYNShRMrSABMNgZBKpJAqKiqJoiFoRDINIi2BYUIhqGCxYRseyZegmEYWVTREr3HKsVTtAanjZSJakXxnGaQJ7jKaLXo6II8YTI" + "WBABaIAQiBahQArOiKchaTZ5YheFRYVBOG4bK6BcguW4qGxSXpuRxZOo2YAFVzNNC3YzkCIcegnIp9ZxeFK5Tg1Z4XKTaNwqPBcYpHPqdVhCOgYZwUb5XMjWNatLYIbo" + "ziiUhzCAeJeG6ZAAAiBIUA0JgziGVJkGUGJIBgUYSBEN5VBoGxCEUHItjSFAxBcRhim4dIqFGTB+BUfxfneegAgCYAoBQFR+lQeASAEBRIGESAogMYJ4DoEIEmCaAqAo" + "JoGGCbgYgaIYYG4HoHGICByCKAoKmGZBOgkYh4hoKIKmKKI2CmC5giMBINBgY0AjODRjgiXg6g2I8glUKAHEifhBhAJApBYRIRmQOQmAoOgLBIEhMhOJJZD4UoUGUSRC" + "FaAoOHKPIAhYZY5GoXIXmWaYGF2GJlgKMB9DmZhpiIZ4aGaSYuG6GomigWgGDmCohmYdIdicWZeHqHRnCgHgIh8aAIBoCA/lAECAg"); axG2antt1.Appearance = (EXG2ANTTLib.AppearanceEnum)0x28000000; axG2antt1.BackColor = Color.FromArgb(255,255,255); axG2antt1.BackColorLevelHeader = Color.FromArgb(255,255,255); (axG2antt1.GetOcx() as EXG2ANTTLib.G2antt).BackColorHeader = 0x27000000; axG2antt1.SelBackColor = Color.FromArgb(0,0,0); axG2antt1.SelForeColor = Color.FromArgb(255,255,255); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.BackColorLevelHeader = 0x27000000; var_Chart.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,255)); var_Chart.Bars["Task"].Color = 0x2a000000; (axG2antt1.GetOcx() as EXG2ANTTLib.G2antt).FilterBarBackColor = 0x1000000; axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,0x29000000); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exToolTipAppearance,0x1000000); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,0x1000000); axG2antt1.EndUpdate(); |
1546 |
Is there anyway to change the style of the splitter which separates the list/chart
axG2antt1.VisualAppearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,0x1000000); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exSplitBar,0x1ff0000); |
1545 |
Does your control support subscript or superscript, in HTML captions
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Item 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<sha ;;0>Event <b><font ;6><off -6>2<off 4>3<off 4>1"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); |
1544 |
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance
|
1543 |
Is it possible to change the visual appearance of the columns selector/floating bar(3)
axG2antt1.ColumnAutoResize = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Column 1"); (var_Columns.Add("Column 2") as EXG2ANTTLib.Column).Visible = false; axG2antt1.VisualAppearance.Add(2,"c:\\exontrol\\images\\normal.ebn"); axG2antt1.VisualAppearance.Add(3,"c:\\exontrol\\images\\pushed.ebn"); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatAppearance,0x2000000); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,0x3000000); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatCaptionBackColor,(uint)ColorTranslator.ToWin32(Color.FromArgb(246,245,240))); axG2antt1.ColumnsFloatBarVisible = EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; |
1542 |
Is it possible to change the visual appearance of the columns selector/floating bar(2)
axG2antt1.ColumnAutoResize = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Column 1"); (var_Columns.Add("Column 2") as EXG2ANTTLib.Column).Visible = false; axG2antt1.VisualAppearance.Add(3,"c:\\exontrol\\images\\pushed.ebn"); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,0x3000000); axG2antt1.ColumnsFloatBarVisible = EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; |
1541 |
Is it possible to change the visual appearance of the columns selector/floating bar(1)
|
1540 |
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list
|
1539 |
Is it possible to list a column to columns selector/floating bar, but still user can use it
axG2antt1.ColumnAutoResize = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Column 1"); (var_Columns.Add("Column 2") as EXG2ANTTLib.Column).Visible = false; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Column 3") as EXG2ANTTLib.Column); var_Column.Visible = false; var_Column.Enabled = false; axG2antt1.ColumnsFloatBarVisible = EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; |
1538 |
How can I prevent a specific column not to be listed in the columns selector/floating bar
|
1537 |
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar
|
1536 |
How can I show the columns selector, so the user can drag and drop columns to the view
|
1535 |
The column's header is changed while the cursor hovers it. Is it possible to prevent that
|
1534 |
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Item 1"); var_Items.AddItem("Item 2"); var_Items.AddItem("Item 3"); axG2antt1.Layout = "Select=\"0\";SingleSort=\"C0:2\";Columns=1"; axG2antt1.EndUpdate(); |
1533 |
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Item 1"); var_Items.AddItem("Item 2"); var_Items.AddItem("Item 3"); axG2antt1.Layout = "gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAG" + "QAqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0" + "jE3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI="; axG2antt1.EndUpdate(); |
1532 |
How do I arrange my columns on multiple levels
axG2antt1.BeginUpdate(); axG2antt1.ColumnAutoResize = false; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("C0") as EXG2ANTTLib.Column); var_Column.ExpandColumns = "1,2"; var_Column.DisplayExpandButton = false; var_Columns.Add("C1"); var_Columns.Add("C2"); var_Columns.Add("C3"); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("C4") as EXG2ANTTLib.Column); var_Column1.ExpandColumns = "5,6"; var_Column1.DisplayExpandButton = false; var_Columns.Add("C5"); EXG2ANTTLib.Column var_Column2 = (var_Columns.Add("C6") as EXG2ANTTLib.Column); var_Column2.ExpandColumns = "6,7"; var_Column2.DisplayExpandButton = false; var_Columns.Add("C7"); axG2antt1.EndUpdate(); |
1531 |
Does your control support expandable header or columns, so I can arrange it on multiple levels
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.BackColorLevelHeader = Color.FromArgb(240,240,240); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Photo") as EXG2ANTTLib.Column); var_Column.AllowSizing = false; var_Column.Width = 32; var_Columns.Add("Personal Info"); var_Columns.Add("Title"); var_Columns.Add("Name"); var_Columns.Add("First"); var_Columns.Add("Last"); var_Columns.Add("Address"); var_Columns["Personal Info"].ExpandColumns = "2,3"; EXG2ANTTLib.Column var_Column1 = var_Columns["Name"]; var_Column1.ExpandColumns = "4,5"; var_Column1.Expanded = false; axG2antt1.EndUpdate(); |
1530 |
I need a Day/Hour Display where the Bars should be created/resized in a 15 Minute Scale in a normal View, but in a 5 Minute Scale when on an InsideZoom. How can I do that
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; var_Chart.UnitWidth = 50; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2013",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.get_Level(0).Label = 4096; var_Chart.get_Level(1).Label = "<%h%>:<%nn%>"; var_Chart.get_Level(1).Unit = EXG2ANTTLib.UnitEnum.exMinute; var_Chart.get_Level(1).Count = 60; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exMinute; var_Chart.ResizeUnitCount = 15; var_Chart.AllowInsideZoom = true; EXG2ANTTLib.InsideZoomFormat var_InsideZoomFormat = var_Chart.DefaultInsideZoomFormat; var_InsideZoomFormat.InsideCount = 5; var_InsideZoomFormat.InsideUnit = EXG2ANTTLib.UnitEnum.exMinute; var_InsideZoomFormat.InsideLabel = "<%nn%>"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Item"); axG2antt1.EndUpdate(); |
1529 |
Can I change the format of date to be shown in the control
axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Default"); EXG2ANTTLib.Column var_Column = (var_Columns.Add("Format.1") as EXG2ANTTLib.Column); var_Column.ComputedField = "%0"; var_Column.FormatColumn = "dateF(value) replace `/` with `-`"; EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("Format.2") as EXG2ANTTLib.Column); var_Column1.ComputedField = "%0"; var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column1.FormatColumn = "`<b>`+ shortdate(value) + `</b> ` + timeF(value)"; EXG2ANTTLib.Column var_Column2 = (var_Columns.Add("Format.3") as EXG2ANTTLib.Column); var_Column2.ComputedField = "%0"; var_Column2.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column2.FormatColumn = "` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `Fr`; 6 : `Sa`) ) + `</b> ` + ( dateF(val" + "ue) replace `/` with `-` )"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(Convert.ToDateTime("1/1/2001 10:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("1/2/2001 10:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); |
1528 |
How can I display a text/caption on the chart part of the control
axG2antt1.BeginUpdate(); axG2antt1.AntiAliasing = true; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/26/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Item 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h1,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"text"); h1 = var_Items.AddItem("Item 2"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h1,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"text outside associated with a bar"); var_Items.set_ItemBar(h1,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); h1 = var_Items.AddItem("Item 3"); var_Items.AddBar(h1,"",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h1,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"text with no bar associated"); h1 = var_Items.AddItem("Item 4"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); h1 = var_Items.AddItem("Item 5"); h1 = var_Items.AddItem("Item 6"); h1 = var_Items.AddItem("Item 7"); h1 = var_Items.AddItem("Item 8"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); h1 = var_Items.AddItem("Item 8"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); EXG2ANTTLib.Notes var_Notes = axG2antt1.Chart.Notes; var_Notes.Add("1S",axG2antt1.Items[3],"A","<font ;6>Movable Note Inside the Bar").set_PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteStart,true); var_Notes.Add("AK",axG2antt1.Items[6],Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Note associated with a date: <%mm%>/<%dd%>/<%yyyy%>"); EXG2ANTTLib.Note var_Note = var_Notes.Add("2S",axG2antt1.Items[7],"A","<font ;6>Fixed Note Left"); var_Note.ShowLink = EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden; var_Note.set_PartVOffset(EXG2ANTTLib.NotePartEnum.exNoteEnd,0); var_Note.set_PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteStart,-32); var_Note.set_PartShadow(EXG2ANTTLib.NotePartEnum.exNoteEnd,false); var_Note.set_PartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd,(uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,0))); EXG2ANTTLib.Note var_Note1 = var_Notes.Add("3S",axG2antt1.Items[8],"A","Start<br><%mmm%> <%d%> <%yyyy%>"); var_Note1.set_PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteEnd,true); var_Note1.set_PartHOffset(EXG2ANTTLib.NotePartEnum.exNoteEnd,-64); var_Note1.LinkStyle = EXG2ANTTLib.LinkStyleEnum.exLinkDot; var_Note1.LinkWidth = 2; var_Note1.LinkColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); EXG2ANTTLib.Note var_Note2 = var_Notes.Add("3F",axG2antt1.Items[8],"A","End<br><%mmm%> <%d%> <%yyyy%>"); var_Note2.RelativePosition = 1; var_Note2.set_PartCanMove(EXG2ANTTLib.NotePartEnum.exNoteEnd,true); var_Note2.LinkStyle = EXG2ANTTLib.LinkStyleEnum.exLinkDot; var_Note2.LinkWidth = 2; var_Note2.LinkColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255)); axG2antt1.EndUpdate(); |
1527 |
Which is the best way of change Bar parent
axG2antt1.Debug = true; axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Item 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); int h2 = var_Items.AddItem("Item 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); int h3 = var_Items.AddItem("Item 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h3,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarParent,h1); System.Diagnostics.Debug.Print( "The Bar A of H3 fails to change the parent to H1 as it has already a bar named A" ); var_Items.set_ItemBar(h3,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarParent,h2); System.Diagnostics.Debug.Print( "The Bar A of H3 can be moved to H2, as it contains no bars with the key A" ); |
1526 |
Is it possible to have a bar in bar
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BS4Dg6AADACAxRDAMgBQKAAzQFAYbBmGaGAAGIZhQgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDKAkRRdDSOYDmGQYDiCIoRShOMIjR" + "LUXxtDYEIRkSZYJAKCTtBwJAAURRULR6ACUYDnSRqGj6CQKRqEVBSLAdKyXJKvaZhGIRSDUJZkWZEIyjBY8EzXNqrIDoGKqYgOQ4XV5TFgxPR9IyhEAaLrleT5TjOII/" + "RpOEpYXSVHxFRAAAYhG4wABCXAAXjYF5Udhlfx3FCvMbqeCcSgOWoDZZRFa0PjVQQtNC4IitGzrMqrNaDSBlGigBauKw3TKlMzye7repOA5+aJGVz7VgfGz7EDjKg0GJ" + "cgMex3lOZB5jgPYHHMaYxjeRBilWbZNG4B49l2do6hkfIhECUhjDoHROEYUYMgEbQMCEEx+lGIY0CQUQJHYGoUgQGBFkgB4FmkOINiMbBrAwQoxngSQMCCYJAG8DYCkM" + "ZJNDOAhAHCbYGGGOBqByB5hiMcJSDORhwjQKoEkKSIgHoEZEDgWJOECSwyGSGwjkWUJUh8HADiiXA6CSRgQliFwcgcSICB2EJkCKDIAB4CAxDgMoOiOIkfA4CoiDCDhA" + "mUEg4hEF4DHKCByA8JYpHIWwbAMIIuC6EIkCiOBwA2QpSHQbgOkoIZMD2GxmnmOhVhUJQiEwYAOAoQZQD6HhnjmaIfBuQ5BlQPQLiMEhuEKIRHmEKA7h+Q5ChQdQPmia" + "hCg+JBnDAAhVCVPpoicHYEAobodicKZqHqGAO0YNA0ikQxKg6IYnAqAZcEGKxqnqOowiUZRSFwYwPAqIZkEOLhrjqaIqB4BAqn6QYwCwKwWkSMZECKLo6jKBA7DKTItW" + "EZBlA8SpRmwRY1G0exYi0HoEEsbpdjcLZrgaYI4kQQo6laOYEFuIpojQCJiHAZgPksAZ0EePBvDuSp0j2bxrmadY+m8QpGnKP4EHwAwAjsCZxiQQQtAgAQrAiQowhKUB" + "/BIcJsEMD5EHETBPBYEhLFwJwZBKMY8G6bAoEaIQMjcIIEkzUZJAscgEEuShyjyKwskucpskQSwuDITJQEyTYzGuMIjBsBBCmiBATjObQDD+UB0E0DxGlCNINASO5PnS" + "MQ7E2Uxu3CbQRguUgYFCVR1H0WxYC2R5xDSDgVWiXA8AyNggksXwPDWQQ3FgL4IHERxsluNpdj6bAqAacQckAEQBQWxfDzF4BUYYqBKhEEQNMDgPQGhFGIDgVwKR3iiC" + "iIIIgig+BfA2MYOLtAqA4ESCYDIFgVDyGEKkPAQgFBDDwG4DYnQzg5GiDIOAZw3hCDoA8MQIA9PeGEHkRIyx6jiOMEoTAxRMhoCeIwUQKSbCKH6NgV43AECyFeEkEQdB" + "TAxC0FESQYhgB+DGPcTwYBXBZEeCIOoKg5j6EIJAbQNxJCjCAMAJwDRxghA4DEBYpk1hnHwH4DIxg3AaFGGgMQFwHhBHgGkewhhCDIHMDkDY0AlAGEAIAgIA="); var_Appearance.Add(2,"c:\\exontrol\\images\\normal.ebn"); var_Appearance.Add(3,"CP:2 2 -4 2 4"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,256); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); axG2antt1.Columns.Add("Info"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Range Moveable Frame"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"F",null); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip,"This bar can be moved inside the displayed range."); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd,Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange,32); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRangeTransparent,90); h = var_Items.AddItem("Range Moveable Pattern"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"F",null); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip,"This bar can be moved inside the displayed range."); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd,Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange,1); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRangeTransparent,90); h = var_Items.AddItem("Range Moveable EBN Transparent"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"F",null); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip,"This bar can be moved inside the displayed range."); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd,Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange,16777216); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRangeTransparent,50); h = var_Items.AddItem("Range Moveable EBN Opaque 1"); var_Items.set_ItemHeight(h,24); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"F",null); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip,"This bar can be moved inside the displayed range."); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd,Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange,33554432); h = var_Items.AddItem("Range Moveable EBN Opaque 2"); var_Items.set_ItemHeight(h,24); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"F",null); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip,"This bar can be moved inside the displayed range."); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd,Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(h,"F",EXG2ANTTLib.ItemBarPropertyEnum.exBarShowRange,50331648); axG2antt1.EndUpdate(); |
1525 |
How can I show vertical lines using the SelectDate
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BK8IQAAYAQGKIYBkAKBQAGaAoDDYMwzQwAAxDMKEEwsACEIrjKCRShyCYZRhGcTAFD8EhhECTY4lCQJAiKLoeQLHMBybJ8LwiGQaRJmeaYR" + "DUMI6QjPVARVIkaxhCSSaKpIAIBEB"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.MarkTodayColor = var_Chart.BackColor; var_Chart.LevelCount = 2; var_Chart.AllowSelectDate = EXG2ANTTLib.SelectDateEnum.exNoSelectDate; var_Chart.MarkSelectDateColor = 0x1000000; var_Chart.SelectLevel = 1; var_Chart.set_SelectDate(Convert.ToDateTime("1/15/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")),true); var_Chart.set_SelectDate(Convert.ToDateTime("1/18/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")),true); axG2antt1.EndUpdate(); |
1524 |
How can I show vertical lines using the SelectDate
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.MarkTodayColor = var_Chart.BackColor; var_Chart.LevelCount = 2; var_Chart.AllowSelectDate = EXG2ANTTLib.SelectDateEnum.exNoSelectDate; var_Chart.MarkSelectDateColor = 0x7fff0000; var_Chart.SelectLevel = 1; var_Chart.set_SelectDate(Convert.ToDateTime("1/15/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")),true); var_Chart.set_SelectDate(Convert.ToDateTime("1/18/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")),true); axG2antt1.EndUpdate(); |
1523 |
How can I find if there is any filter applied to the control
// FilterChange event - Occurs when the filter was changed. private void axG2antt1_FilterChange(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "If negative, the filter is present, else not" ); System.Diagnostics.Debug.Print( axG2antt1.Items.VisibleItemCount.ToString() ); } //this.axG2antt1.FilterChange += new EventHandler(this.axG2antt1_FilterChange); axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.TreeColumnIndex = -1; axG2antt1.FilterInclude = EXG2ANTTLib.FilterIncludeEnum.exMatchingItemsOnly; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Column") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exFilter; var_Column.Filter = "C1"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("R1"); var_Items.InsertItem(h,null,"C1"); var_Items.InsertItem(h,null,"C2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("R2"); var_Items.InsertItem(h,null,"C1"); var_Items.InsertItem(h,null,"C2"); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1522 |
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option
axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.TreeColumnIndex = -1; axG2antt1.FilterInclude = EXG2ANTTLib.FilterIncludeEnum.exMatchingItemsOnly; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Column") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exFilter; var_Column.Filter = "C1|C2"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("R1"); var_Items.InsertItem(h,null,"C1"); var_Items.InsertItem(h,null,"C2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("R2"); var_Items.InsertItem(h,null,"C1"); var_Items.InsertItem(h,null,"C2"); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1521 |
Is there any method to get only the matched items and not the items with his parent
axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.FilterInclude = EXG2ANTTLib.FilterIncludeEnum.exMatchingItemsOnly; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Column") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exFilter; var_Column.Filter = "C1|C2"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("R1"); var_Items.InsertItem(h,null,"C1"); var_Items.InsertItem(h,null,"C2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("R2"); var_Items.InsertItem(h,null,"C1"); var_Items.InsertItem(h,null,"C2"); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1520 |
Is it possible to specify a working day exception that would override the non-working day pattern
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Pattern"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/24/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,52); var_Chart.LevelCount = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Default"); var_Items.set_ItemNonworkingUnits(var_Items.AddItem("1/26/2008"),false,"weekday(value) case (default:0 ; 0:1; 6:(value != #1/26/2008#))"); var_Items.set_ItemNonworkingUnits(var_Items.AddItem("1/27/2008"),false,"weekday(value) case (default:0 ; 0:(value != #1/27/2008#); 6:1)"); var_Items.set_ItemNonworkingUnits(var_Items.AddItem("Sundays"),false,"weekday(value) = 0"); axG2antt1.EndUpdate(); |
1519 |
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area
axG2antt1.BeginUpdate(); axG2antt1.ScrollBars = EXG2ANTTLib.ScrollBarsEnum.exDisableBoth; axG2antt1.Chart.ToolTip = ""; axG2antt1.set_ScrollPartVisible(EXG2ANTTLib.ScrollBarEnum.exVScroll,EXG2ANTTLib.ScrollPartEnum.exExtentThumbPart,true); axG2antt1.set_ScrollPartVisible(EXG2ANTTLib.ScrollBarEnum.exHScroll,EXG2ANTTLib.ScrollPartEnum.exExtentThumbPart,true); axG2antt1.set_ScrollPartVisible(EXG2ANTTLib.ScrollBarEnum.exHChartScroll,EXG2ANTTLib.ScrollPartEnum.exExtentThumbPart,true); axG2antt1.ScrollWidth = 4; axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exVSBack,(uint)ColorTranslator.ToWin32(Color.FromArgb(240,240,240))); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exVSThumb,(uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128))); axG2antt1.ScrollHeight = 4; axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exHSBack,axG2antt1.get_Background(EXG2ANTTLib.BackgroundPartEnum.exVSBack)); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exHSThumb,axG2antt1.get_Background(EXG2ANTTLib.BackgroundPartEnum.exVSThumb)); axG2antt1.set_Background(EXG2ANTTLib.BackgroundPartEnum.exScrollSizeGrip,axG2antt1.get_Background(EXG2ANTTLib.BackgroundPartEnum.exVSBack)); axG2antt1.EndUpdate(); |
1518 |
Is it possible to associate an extra frame, border, EBN to the bar/task
axG2antt1.BeginUpdate(); EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BNACg6AADACAxRDAMgBQKAAzQFAYbhsGCGAAGEZBQgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDEAkRRdDSOYDmGQYDiCIoRShOMaTV" + "J8bQ2ASEaAmWK3boUAJFPrFc6ABJMZRRISXJABeKwRoGJYaUhRdDRNCIZBqEqua7iEZRQqCCZkWZPNTRVScByhF61IDpWjKLDKJJwXBMcxyBL0NRxFTAKawGoYbq0AJQ" + "VTQcZPVhgAYYfSlMDuOB5Gq+G5SQjhWIgBjde4dRrHYrsGyQAp7JJoWLZMQyFIFIYNTS8LgpPI6LyyP5rABhWw5PiUVyfWTMdwzPatbyKHJicbpepWPxcNYtNzcNb3SA" + "bn+KgAmqP5yDiIAACIEhQDSGJOgcU4RhQYwgFUQwIESXxEGgbQJBQQhzHmUAAGILh0lWbpEGIIQQHuegaAaoRYBUBYBCgFAOAOQJgC4CgCCCQAUAQARACgRZFEa3ogCc" + "CICDCDZ9AeH5wGgFoHmAUBIA6CJgiALgMAIABYiYER+BuMIyC4CZjAcYgygyYxIlYNoNBGMJGDoCximiXg+g+Yx0G0DgNiOIJGECEZkgQbA7A8A5JA4SITmOZBsEGFJD" + "kkLhQhXOItBYEZEGEHBCBARApGIYh1EAaIoAMQIEkENBNBGZpJg4YgCGcAAaGUAAFCmVhqBMZppGADQDACQAmAwAAFgoBh1BSJ4ZFwEEdHmcFmgWag2gEFhoFlINYkoH" + "AQAABhKGQX4jGkGQ8BiJ5BDqBAABqKl1GSJxkgAcoqAYAR3lQcIrkaOoSiiEZCBCBAgiqAaJHaLpHBqQoliaBZxHwWYwkUQRMFQExEmENBJBIRIBAgQwQkOYJ0D4DhDg" + "CYAzjWQpgjwLgKi2QIWl4CACADeofC4SpsHcHArlqRBqBkbpLAaQoxAUQRQE6PLoCaT40AOYJ6lWNdXlAL4/m2QIql4CRAAQBCAg="); var_Appearance.Add(2,"CP:1 -4 -4 4 4"); axG2antt1.Columns.Add("Task"); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h = var_Items.AddItem("Task/ EBN Frame"); var_Items.set_ItemHeight(h,32); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432); h = var_Items.AddItem("Task/ EBN Frame"); var_Items.set_ItemHeight(h,32); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,50331392); var_Items.AddBar(var_Items.AddItem("Task"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); axG2antt1.EndUpdate(); |
1517 |
Is it possible to automatically display the working days duration in a column
axG2antt1.BeginUpdate(); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (var_Columns.Add("Duration") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,513); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A"); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("Working") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,258); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A"); axG2antt1.Items.AllowCellValueToItemBar = true; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,256); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/3/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); axG2antt1.EndUpdate(); |
1516 |
How can I apply colors to columns section of the control based on properties of the displaying bars
// BarResize event - Occurs when a bar is moved or resized. private void axG2antt1_BarResize(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent e) { axG2antt1.Refresh(); } //this.axG2antt1.BarResize += new AxEXG2ANTTLib._IG2anttEvents_BarResizeEventHandler(this.axG2antt1_BarResize); axG2antt1.BeginUpdate(); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("<fgcolor=FF0000>Tasks > 2 days") as EXG2ANTTLib.Column); var_Column.HTMLCaption = var_Column.Caption; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("PropertyBar") as EXG2ANTTLib.Column); var_Column1.Visible = false; var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,""); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,513); axG2antt1.Items.AllowCellValueToItemBar = true; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.NonworkingDays = 0; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = axG2antt1.ConditionalFormats.Add("%1 > 2",null); var_ConditionalFormat.ForeColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_ConditionalFormat.Bold = true; axG2antt1.SelBackColor = axG2antt1.BackColor; axG2antt1.SelForeColor = axG2antt1.ForeColor; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); axG2antt1.EndUpdate(); |
1515 |
Is it possible to update the colors on columns caption to highlight the critical path ( CPM )
// BarResize event - Occurs when a bar is moved or resized. private void axG2antt1_BarResize(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent e) { axG2antt1.Items.SchedulePDM(e.item,e.key); axG2antt1.Refresh(); } //this.axG2antt1.BarResize += new AxEXG2ANTTLib._IG2anttEvents_BarResizeEventHandler(this.axG2antt1_BarResize); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("PropertyBar") as EXG2ANTTLib.Column); var_Column.Visible = false; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,""); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,269); axG2antt1.Items.AllowCellValueToItemBar = true; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.NonworkingDays = 0; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = axG2antt1.ConditionalFormats.Add("%1 != 0",null); var_ConditionalFormat.ForeColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_ConditionalFormat.Bold = true; axG2antt1.SelBackColor = axG2antt1.BackColor; axG2antt1.SelForeColor = axG2antt1.ForeColor; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L1",h1,"",h2,""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L2",h2,"",h3,""); int h4 = var_Items.AddItem("Task 3"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddLink("L3",h2,"",h4,""); var_Items.set_DefSchedulePDM(EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathBarColor,255); var_Items.set_DefSchedulePDM(EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathLinkColor,255); var_Items.SchedulePDM(0,""); axG2antt1.EndUpdate(); |
1514 |
I am using the AddShapeCorner to define icon-bars. Is it possible to define with a different color
axG2antt1.BeginUpdate(); axG2antt1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); EXG2ANTTLib.Bars var_Bars = var_Chart.Bars; var_Bars.AddShapeCorner(12345,1); EXG2ANTTLib.Bar var_Bar = var_Bars.Copy("Milestone","Original"); var_Bar.StartShape = (EXG2ANTTLib.ShapeCornerEnum)0x3020 | EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar | EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight; var_Bar.StartColor = -1; EXG2ANTTLib.Bar var_Bar1 = var_Bars.Copy("Milestone","Red"); var_Bar1.StartShape = (EXG2ANTTLib.ShapeCornerEnum)0x3020 | EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar | EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight; var_Bar1.StartColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); EXG2ANTTLib.Bar var_Bar2 = var_Bars.Copy("Milestone","Green"); var_Bar2.StartShape = (EXG2ANTTLib.ShapeCornerEnum)0x3020 | EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar | EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight; var_Bar2.StartColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0)); axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Original"),"Original",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Red"),"Red",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Green"),"Green",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1513 |
My icon-bars shows different when displaying in the chart. Any ideas
axG2antt1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Bars var_Bars = axG2antt1.Chart.Bars; var_Bars.AddShapeCorner(12345,1); EXG2ANTTLib.Bar var_Bar = var_Bars["Milestone"]; var_Bar.StartShape = (EXG2ANTTLib.ShapeCornerEnum)0x3020 | EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar | EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight; var_Bar.StartColor = -1; axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Milestone",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); |
1512 |
The items are not colored in the chart panel
axG2antt1.Chart.set_PaneWidth(false,128); axG2antt1.Columns.Add("Default"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Item"); axG2antt1.Chart.set_ItemBackColor(h,(uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0))); axG2antt1.Items.set_ItemBackColor(h,(uint)ColorTranslator.ToWin32(Color.FromArgb(0,255,0))); |
1511 |
I need to know how to determine the critical path (CPM) after the SchedulePDM procedure, so I can turn red the bars and links
// BarResize event - Occurs when a bar is moved or resized. private void axG2antt1_BarResize(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent e) { axG2antt1.Items.SchedulePDM(e.item,e.key); } //this.axG2antt1.BarResize += new AxEXG2ANTTLib._IG2anttEvents_BarResizeEventHandler(this.axG2antt1_BarResize); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.NonworkingDays = 0; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); int h4 = var_Items.AddItem("Task 3"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K4",null); var_Items.AddLink("L3",h2,"K2",h4,"K4"); var_Items.set_DefSchedulePDM(EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathBarColor,255); var_Items.set_DefSchedulePDM(EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathLinkColor,255); var_Items.SchedulePDM(0,"K1"); axG2antt1.EndUpdate(); |
1510 |
How can I display the Year in Thai, Buddhist, Korean format
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstWeekDay = var_Chart.LocFirstWeekDay; var_Chart.MonthNames = var_Chart.LocMonthNames; var_Chart.WeekDays = var_Chart.LocWeekDays; var_Chart.AMPM = var_Chart.LocAMPM; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,0); var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Label = "<%mmmm%> <%d%>, <%loc_yyyy%> <r><%ww%>"; var_Level.Unit = EXG2ANTTLib.UnitEnum.exWeek; var_Level.ToolTip = var_Level.Label; var_Chart.ToolTip = "<%ddd%> <%m%>/<%d%>/<%loc_yyyy%>"; axG2antt1.set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarDateMonths,axG2antt1.Chart.MonthNames); axG2antt1.set_DefaultEditorOption(EXG2ANTTLib.EditorOptionEnum.exDateMonths,axG2antt1.Chart.MonthNames); |
1509 |
How does localization work
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstWeekDay = var_Chart.LocFirstWeekDay; var_Chart.MonthNames = var_Chart.LocMonthNames; var_Chart.WeekDays = var_Chart.LocWeekDays; var_Chart.AMPM = var_Chart.LocAMPM; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,0); |
1508 |
Is it possible to show the bars with a different brightness (2)
EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task--.ebn"); var_Appearance.Add(2,"C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task-.ebn"); var_Appearance.Add(3,"C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task.ebn"); var_Appearance.Add(4,"C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task+.ebn"); var_Appearance.Add(5,"C:/Program Files/Exontrol/ExG2antt/Sample/EBN/2task++.ebn"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.Bars.Copy("Task","--").Color = 0x1000000; var_Chart.Bars.Copy("Task","-").Color = 0x2000000; var_Chart.Bars["Task"].Color = 0x3000000; var_Chart.Bars.Copy("Task","+").Color = 0x4000000; var_Chart.Bars.Copy("Task","++").Color = 0x5000000; axG2antt1.Columns.Add("Brightness"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("0%"); var_Items.AddBar(h,"--",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"--",null); var_Items.AddBar(h,"-",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"-",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddBar(h,"+",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"+",null); var_Items.AddBar(h,"++",Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"++",null); h = var_Items.AddItem("25%"); var_Items.AddBar(h,"--",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"--",null); var_Items.AddBar(h,"-",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"-",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddBar(h,"+",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"+",null); var_Items.AddBar(h,"++",Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"++",null); var_Items.set_ItemBar(h,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,25); h = var_Items.AddItem("50%"); var_Items.AddBar(h,"--",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"--",null); var_Items.AddBar(h,"-",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"-",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddBar(h,"+",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"+",null); var_Items.AddBar(h,"++",Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"++",null); var_Items.set_ItemBar(h,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,50); h = var_Items.AddItem("75%"); var_Items.AddBar(h,"--",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"--",null); var_Items.AddBar(h,"-",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"-",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddBar(h,"+",Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"+",null); var_Items.AddBar(h,"++",Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"++",null); var_Items.set_ItemBar(h,"<*>",EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,75); |
1507 |
Is it possible to show the bars with a different brightness (1)
axG2antt1.VisualAppearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.Bars["Task"].Color = 0x1000000; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); axG2antt1.Columns.Add("Brightness"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("0%"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem("25%"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,25); h = var_Items.AddItem("50%"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,50); h = var_Items.AddItem("75%"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,75); |
1506 |
So the behavior I am looking for is that a change can cascade through a bar's successors, but a change that would affect a bar's predecessors is not allowed. Is this possible to in ExG2antt
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; axG2antt1.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exResizeChart; axG2antt1.Columns.Add("Tasks"); (axG2antt1.Columns.Add("Start") as EXG2ANTTLib.Column).Visible = false; (axG2antt1.Columns.Add("End") as EXG2ANTTLib.Column).Visible = false; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/18/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); var_Chart.set_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exStartDate,var_Chart.FirstVisibleDate); var_Chart.set_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exEndDate,Convert.ToDateTime("12/31/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Chart.MarkSelectDateColor = 0x7fff0000; var_Chart.SelectLevel = 1; var_Chart.set_SelectDate(Convert.ToDateTime("9/19/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),true); var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.AllowLinkBars = false; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Project"); var_Items.set_CellValue(h,1,Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(h,2,Convert.ToDateTime("10/3/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddBar(h,"Summary",var_Items.get_CellValue(h,1),var_Items.get_CellValue(h,2),"sum",null); int h1 = var_Items.InsertItem(h,null,"Task 1"); var_Items.set_CellValue(h1,1,var_Items.get_CellValue(h,1)); var_Items.set_CellValue(h1,2,Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddBar(h1,"Task",var_Items.get_CellValue(h1,1),var_Items.get_CellValue(h1,2),"K1",null); var_Items.set_ItemBar(h1,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart,Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); int h2 = var_Items.InsertItem(h,null,"Task 2"); var_Items.set_CellValue(h2,1,var_Items.get_CellValue(h1,2)); var_Items.set_CellValue(h2,2,Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddBar(h2,"Unknown",var_Items.get_CellValue(h2,1),var_Items.get_CellValue(h2,2),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); int h3 = var_Items.InsertItem(h,null,"Task 3"); var_Items.set_CellValue(h3,1,var_Items.get_CellValue(h2,2)); var_Items.set_CellValue(h3,2,var_Items.get_CellValue(h,2)); var_Items.AddBar(h3,"Task",var_Items.get_CellValue(h3,1),var_Items.get_CellValue(h3,2),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.GroupBars(h1,"K1",false,h2,"K2",true,31,"0;4"); var_Items.GroupBars(h2,"K2",false,h3,"K3",true,31,"0;2"); var_Items.DefineSummaryBars(h,"sum",h1,"K1"); var_Items.DefineSummaryBars(h,"sum",h2,"K2"); var_Items.DefineSummaryBars(h,"sum",h3,"K3"); var_Items.set_ExpandItem(h,true); var_Items.set_ItemBold(h,true); axG2antt1.EndUpdate(); |
1505 |
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Car") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exFilter; var_Column.Filter = "MAZDA"; EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("Equipment") as EXG2ANTTLib.Column); var_Column1.DisplayFilterButton = true; var_Column1.DisplayFilterPattern = false; var_Column1.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"; var_Column1.FilterType = EXG2ANTTLib.FilterTypeEnum.exPattern; var_Column1.Filter = "AIR BAG"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("Mazda"),1,"Air Bag"); var_Items.set_CellValue(var_Items.AddItem("Toyota"),1,"Air Bag,Air condition"); var_Items.set_CellValue(var_Items.AddItem("Ford"),1,"Air condition"); var_Items.set_CellValue(var_Items.AddItem("Nissan"),1,"Air Bag,ABS,ESP"); var_Items.set_CellValue(var_Items.AddItem("Mazda"),1,"Air Bag, ABS,ESP"); var_Items.set_CellValue(var_Items.AddItem("Mazda"),1,"ABS,ESP"); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1504 |
How can I have a case-sensitive filter
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Car") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exFilterDoCaseSensitive | EXG2ANTTLib.FilterTypeEnum.exFilter; var_Column.Filter = "Mazda"; EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("Equipment") as EXG2ANTTLib.Column); var_Column1.DisplayFilterButton = true; var_Column1.DisplayFilterPattern = false; var_Column1.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"; var_Column1.FilterType = EXG2ANTTLib.FilterTypeEnum.exFilterDoCaseSensitive | EXG2ANTTLib.FilterTypeEnum.exPattern; var_Column1.Filter = "Air Bag"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("Mazda"),1,"Air Bag"); var_Items.set_CellValue(var_Items.AddItem("Toyota"),1,"Air Bag,Air condition"); var_Items.set_CellValue(var_Items.AddItem("Ford"),1,"Air condition"); var_Items.set_CellValue(var_Items.AddItem("Nissan"),1,"Air Bag,ABS,ESP"); var_Items.set_CellValue(var_Items.AddItem("Mazda"),1,"Air Bag, ABS,ESP"); var_Items.set_CellValue(var_Items.AddItem("Mazda"),1,"ABS,ESP"); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1503 |
Is it possible to add a custom label to the days with a specified background color
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","Leave Blank"); var_Items.set_ItemBar(h1,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable,false); var_Items.set_ItemBar(h1,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor,255); axG2antt1.EndUpdate(); |
1502 |
What is the event fired when I change "...Chart.PaneWidthLeft" (or "...Chart.PaneWidthRight") in the Gantt splitter window
// ChartEndChanging event - Occurs after the chart has been changed. private void axG2antt1_ChartEndChanging(object sender, AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEvent e) { System.Diagnostics.Debug.Print( "End Operation(exVSplitterChange(10)" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); System.Diagnostics.Debug.Print( "PaneWidth:" ); System.Diagnostics.Debug.Print( axG2antt1.Chart.get_PaneWidth(false).ToString() ); } //this.axG2antt1.ChartEndChanging += new AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEventHandler(this.axG2antt1_ChartEndChanging); // ChartStartChanging event - Occurs when the chart is about to be changed. private void axG2antt1_ChartStartChanging(object sender, AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEvent e) { System.Diagnostics.Debug.Print( "Start Operation(exVSplitterChange(10)" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); System.Diagnostics.Debug.Print( "PaneWidth:" ); System.Diagnostics.Debug.Print( axG2antt1.Chart.get_PaneWidth(false).ToString() ); } //this.axG2antt1.ChartStartChanging += new AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEventHandler(this.axG2antt1_ChartStartChanging); |
1501 |
I want to ask if I can select more than one bar in the chart and move them together
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); var_Chart.LevelCount = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h = var_Items.AddItem(""); var_Items.AddBar(h,"",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","<b>Right click</b> the chart, start dragging to select multiple bars<br>or click a bar while pressing the <b>CTRL</b> key"); var_Items.set_ItemHeight(h,36); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable,false); axG2antt1.EndUpdate(); |